<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>证券账户管理 </title>
    <link  href=".././css/accountManage.css" rel="stylesheet" type="text/css"/>
    <link href=".././css/font-awesome.css" rel="stylesheet"/>
    <link  href=".././css/common.css" rel="stylesheet" />
    <script type="text/javascript" src=".././js/jquery-1.10.1.min.js"></script>
    <script type="text/javascript" src=".././js/google-maps.js"></script>
    <script>$(document).ready(function(){$(".vertical-nav").verticalnav({speed: 400,align: "left"});});</script>
</head>
<body>
<div id="Container">
    <div id="Header">
           <center><h1>股票交易系统后台管理</h1></center>
    </div>
    <div id="Content">
        <div id="Content-Left">
            <ul class="vertical-nav dark red">
                <li class="active"><a href=".././index.html"><i class="icon-home"></i>首页</a></li>
                <li><a href="../html/accountManage.html"><i class="icon-cogs"></i>证券账户管理
                    <span class="submenu-icon"></span></a>
                    <ul>
                        <li><a href=".././html/personRegister.html  ">个人账户开户</a></li>
                        <li><a href=".././html/coporationRegister.html">法人账户开户</a></li>
                        <li><a href=".././html/logoutAccount.html">挂失账户</a></li>
                        <li><a href=".././html/lossAccount.html">注销账户信息</a></li>
                        <li><a href=".././html/AccountStateQuery.html">查询账户状态</a></li>
                        <li><a href="../html/accountManage.html">查询账户信息</a></li>
                        <li><a href="../html/accountCheckAndQuery.html">查看并审核未审核客户信息</a></li>
                    </ul>
                </li>
                <li><a href=" "><i class="icon-briefcase"></i>资金账户管理
                    <span class="submenu-icon"></span></a>
                    <ul>
                        <li><a href="./fund/Accountnew.html">创建新资金用户</a></li>
                    </ul>
                </li>
                <li><a href="  "><i class="icon-user"></i>关于我们</a></li>
                <li><a href="  "><i class="icon-envelope"></i>联系我们</a></li>
            </ul>
        </div>
        <div id="Content-Right">
            <div  id="toolbar" class="toolbar">
                <h2 class="title">根据ID查询账户信息 </h2>
            </div>
            <!-- 数据修改面板-->
            <div  id="editPanel" style="overflow-x: hidden;margin: 0;padding:0;" >
			    <form  id="p_select_form">
                <table class="edittable" style="width:900px">
                    <tr style="height:0px;border: 0px;">
                        <td class="right" style="width:130px;border: 0px;"></td>
                        <td class="left" style="width:310px;border: 0px;"></td>
                        <td class="right" style="width:130px;border: 0px;"></td>
                        <td class="left" style="border: 0px;"></td>
                    </tr>
                    <tr>
                        <td class="right" style="width:130px;border-top: 0px;">个人账户ID</td>

                        <td class="left" colspan="3" style="border-top: 0px;height: 40px;line-height: 40px;">
                            <input type="text" id="id"  name="id" class="input" maxlength="18" placeholder="请输入个人账户ID" watermark="请输入个人账户ID" />
                            <select name="type" id="type" >
                                <option value="0">个人账户 </option>
                                <option value="1">法人账户</option>
                            </select>
                            <button class="btnblue" id="selectstu" useable="edit" onclick="selectAccountList()" >搜索</button>
                            <span class="stuspan" id="stuspan"><p color="">*输入完毕后,点击'搜索'按钮查询信息</p></span>
                        </td>
                    </tr>
                </table>
				</form>
            </div>
            <!--数据查询显示区-->
            <div id="querylist">
                <table id="accountTable" style="display:none;" >
                    <thead>
                    <tr>
                    <th style="width:10%;">个人账户ID</th>
                    <th style="width:15%;">注册时间</th>
                    <th style="width:15%;" >个人姓名</th>
                    <th style="width:10%;">性别</th>
                    <th style="width:15%;">身份证号</th>
                    <th style="width:15%;">家庭住址</th>
                    <th style="width:15%;">职业</th>
                    <th style="width:15%;">学历</th>
                    <th style="width:15%;">工作单位</th>
                    <th style="width:15%;">电话号码</th>
                    <th style="width:10%;">是否代办</th>
                    <th style="width:15%;">代办身份证号</th>
                    <th style="width:15%;">账户状态</th>
                     </tr>
                    </thead>
                    <tbody id="infoByid">
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div id="Footer"> <p></font>COPYRIGHT2017-2017 &copy;<BR></font></p></div>
</div>
</body>
</html>

<script type="text/javascript">
    function selectAccountList(){
        var tbody=window.document.getElementById("infoByid");
        var idata=$("#id").val();
        var fdata = JSON.stringify($("#type").val());
        //  var fdata = $("#type").serialize();
        //$.param(fdata);
        console.log(fdata);
        $.ajax({
            url:" ../securityAccount/"+idata,
            type:"GET",
            data:fdata,
            dataType:"jsonp",
            contentType:"application/x-www-form-urlencoded; charset=utf-8",
            success:function(res ){
                console.log(res.object);
                if(res.code==0){
                    var str="";
                    var tdata=res.object;
                    for( i in tdata){
                        if(tdata[i].pValidState==0){
                            tdata[i].pValidState="无效";
                        }if(tdata[i].pValidState==1){
                            tdata[i].pValidState="审核中";
                        }else if(tdata[i].pValidState==2){
                            tdata[i].pValidState="已审核";
                        }
                        str +="<tr>"+"<td>"+tdata[i].pAccountId+"</td>"+"<td>"+tdata[i].pAccountRegisterTime+"</td>"+"<td>"+tdata[i].pName+"</td>"
                            + "<td>"+tdata[i].pSex+"</td>"+"<td>"+tdata[i].pIdNumber+"</td>"+ "<td>"+tdata[i].pHomeAddress+"</td>"
                            +"<td>"+tdata[i].pOccupation+"</td>" +"<td>"+tdata[i].pEducation+"</td>"+"<td>"+tdata[i].pWorkUnit+"</td>"
                            +"<td>"+tdata[i].pPhoneNumber+"</td>"+"<td>"+tdata[i].pProxy+"</td>"+ "<td>"+tdata[i].pProxyIdNumber+"</td>"
                            +"<td>"+tdata[i].pValidState+"</td>"+"</tr>";
                        tbody.innerHTML =str;
                    }
                }
            },
            error:function(){
                alert("查询失败！");
           }
        });
    }
</script>